<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>步骤条</title>		
		<style type="text/css">
			.step {
				border: 1px solid #E9E9E9;
				border-radius: 5px;
				overflow: hidden;
				box-shadow: 0 0 4px #E9E9E9;
				width: 800px;
				margin: 50px auto;
				-moz-box-sizing: border-box;
				-ms-box-sizing: border-box;
				box-sizing: border-box;
			}
			
			.step .steps {
				display: inline-block;
				padding: 10px 70px;
				background: white;
				color: black;
				font-family: "Microsoft YaHei";
				position: relative;
				width: 25%;
				-moz-box-sizing: border-box;
				-ms-box-sizing: border-box;
				box-sizing: border-box;
				float: left;
				transition: all ease-in 0.5s;
				cursor: pointer;
			}
			
			.step .steps::after {
				position: absolute;
				content: "";
				display: block;
				height: 30px;
				width: 30px;
				background: white;
				top: 5px;
				right: -15px;
				-webkit-transform: rotate(-45deg);
				-ms-transform: rotate(-45deg);
				transform: rotate(-45deg);
				transition: all ease-in 0.5s;
			}
			
			.step .steps:nth-child(1) {
				z-index: 3;
			}
			
			.step .steps:nth-child(2) {
				z-index: 2;
			}
			
			.step .steps:nth-child(3) {
				z-index: 1;
			}
			
			.step .steps:last-child::after {
				display: none;
			}
			
			.step .steps:hover,
			.step .steps:hover::after {
				background: #F0F0F0;
			}
			
			.step .steps:active,
			.step .steps:active::after {
				background: #8FA35D;
				color: white;
			}
			
			.step .steps.action {
				color: white;
				background-color: #3690CF;
			}
			
			.step .steps.action::after {
				background-color: #3690CF;
			}
			
			.step .steps:nth-child(3)::after {
				border-bottom: 1px solid #E5E5E5;
				border-right: 1px solid #E5E5E5;
			}
			
			.step .steps.disabled,
			.step .steps.disabled::after {
				color: #CBCBCB;
				background: white;
			}
		</style>
	</head>

	<body>
		<div class="step">
			<span class="steps action">第一步</span>
			<span class="steps">第二步</span>
			<span class="steps">第三步</span>
			<span class="steps">第四步</span>
		</div>
		<script type="text/javascript">
			var list=document.querySelectorAll('.steps');
			
			for(var i=0;i<list.length;i++){
				list[i].onclick=function(){
					var actionEl=document.querySelector('.action');
					actionEl.classList.remove('action');
					this.classList.add('action');					
				};
			}
		</script>
	</body>

</html>